﻿<?xml version="1.0" encoding="utf-8" ?>
<html xmlns="http://www.xidea.org/taglib/xhtml"
	xmlns:c="http://www.xidea.org/taglib/core">
<head>
<base target="content" />
<meta http-equiv="Content-Type" content="text/html;utf-8" />
<title>JSIntegeration Doc Menu</title>
<link rel="stylesheet" type="text/css" href="${css}" />

<script type="text/javascript">//<!-- opera bug --><![CDATA[

function collapse(li){
  while(li && li.tagName!="LI"){
    li = li.parentNode;
  }
  if(li.className.indexOf("open")>-1){
    li.className = li.className.replace(/\bopen\b/,'closed');
  }else{
    li.className = li.className.replace(/\bclosed\b/,'open');
  }
}
function loadPackage(name){
  var ul = document.getElementById('pkg_'+name);
  if(ul.getAttribute('title') == "loading"){
    ul.setAttribute('title','loaded');
    var pkgInfo = parent.jsdoc.packageInfos[name];
    var os;
    var i=0;
    function timer(){
      if(i<os.length){
        var obj = os[i++];
        var li = document.createElement("li");
        li.setAttribute('title',"file:"+obj.fileInfo.name);
        var a = document.createElement("a");
        a.className = "obj-"+obj.getType();
        a.setAttribute('class',a.className);
        //ie not support by attribute
        a.onclick = function(){
           return parent.jsdoc.gen({cmd:'genObject',args:[obj.name,obj.fileInfo.pkgInfo.name]},obj.name);
        };
        a.setAttribute('href',"#");
        a.appendChild(document.createTextNode(obj.name));
        li.appendChild(a);
        ul.appendChild(li);
        window.setTimeout(timer,20);
      }else{
        while(true){
          var node = ul.firstChild;
          if(node == null || node.tagName=='LI'){
            break;
          }else{
            ul.removeChild(node);
          }
        }
      }
    }
    var tasks = pkgInfo.getInitializers();
    tasks.push(function(){
      os = pkgInfo.getObjectInfos();
      timer();
    });
    
    parent.jsdoc.runTasks(tasks);
  }
}
//]]> 
</script>

<style type="text/css">
.boxlink{
  font-size:12px;
  line-height:12px;
  color:#333333;
  border: 1px solid #000000;
  text-decoration:none;
  margin: 2px;
  padding: 2px;
}
body{margin:0;padding:0;}
.inner-obj{color :#888;}
</style>
</head>
<body>
<div id="topbar">
<a title="JSI主页" href="http://www.xidea.org/project/jsi" target="_top" class="boxlink">项目主页</a> 
<a title="JSDoc主页" href="default.html" class="boxlink">JSDoc主页</a> 
</div>
<h4>自由脚本</h4>

<ul class="package-pane">
	<c:forEach var="obj" items="${rootInfo.getObjectInfos()}">
		<li title="file:${obj.fileInfo.name}"><a
			class="obj-${obj.getType()}"
			onclick="return parent.jsdoc.gen({cmd:'genObject',args:['${obj.name}','']},'${obj.name}')"
			href="#">
      <c:if test="${'Log Package ScriptLoader TaskQueue LoadTask'.indexOf(obj.name) > -1}">
      <span class="inner-obj" title="内部对象">#${obj.name}</span>
      </c:if>
      <c:else>
      ${obj.name}
      </c:else>
      </a>
	</li>
	</c:forEach>
</ul>
<h4>托管脚本</h4>
<ul>
	<c:forEach var="pkgInfo" items="${packageInfos}">
		<c:if test="${pkgInfo.implementation}">
			<li class="closed">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td style="width:14px;">
					<button class="openhandle" onclick="collapse(this)">+</button>
					<button class="closehandle" onclick="collapse(this)">-</button>
					</td>
					<td><a class="pkg-ref" onclick="return parent.jsdoc.gen({cmd:'genPackage',args:['${pkgInfo.implementation}']},'')" href="#">${pkgInfo.name}
					</a></td>
				</tr>
				<tr>
					<td colspan="2">
					<ul>
						<div>指向: ${pkgInfo.implementation}</div>
					</ul>
					</td>
				</tr>
			</table>
			</li>
		</c:if>
		<c:else>
			<li title="" class="closed" onclick="loadPackage('${pkgInfo.name}')"><!--${pkgInfo.getDescription()}-->
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td style="width:14px;">
					<button class="openhandle" onclick="collapse(this)">+</button>
					<button class="closehandle" onclick="collapse(this)">-</button>
					</td>
					<td><a class="pkg" onclick="return parent.jsdoc.gen({cmd:'genPackage',args:['${pkgInfo.name}']},'')" href="#">${pkgInfo.name}
					</a></td>
				</tr>
				<tr>
					<td colspan="2">
					<ul id="pkg_${pkgInfo.name}" title="loading">
						<div class="loading">Loading....</div>
					</ul>
					</td>
				</tr>
			</table>
			</li>
		</c:else>
	</c:forEach>
</ul>
</body>
</html>